package cn.lin.factory.mediator;
/**
 * @author liufl E-mail:Huberier@allpyra.com
 * @version 创建时间：2017年8月22日 下午6:33:55
 * 中介者接口--与其他对象通信
 */
public class MediatorModeConcrete extends MediatorMode {
	
	MediatorModeColleagueZhangsan play;
	MediatorModeColleagueLisi game;

	@Override
	public void connect(String msg, MediatorModeColleague colleague) {
		if(colleague==play){
			game.getMessage(msg);
		}else{
			play.getMessage(msg);
		}
	}

	public void setPlay(MediatorModeColleagueZhangsan play) {
		this.play = play;
	}

	public void setGame(MediatorModeColleagueLisi game) {
		this.game = game;
	}

}

